import http from './http.js'

const loginApi = data =>{
	return http.post({
		url:'/login',
		data
	})
}
const registerApi= data =>{
	return http.post({
		url:'/regist/add',
		data
	})
}
const codeApi= data =>{
	return http.get({
		url:'/kaptcha',
		data
	})
}
const addbookApi= data =>{
	return http.post({
		url:'/books/addbooks',
		data
	})
}
const uploadApi= data =>{
	return http.post({
		url:'/books/upload',
		data
	})
}
const booklistApi= data =>{
	return http.get({
		url:'/books/booklist',
		data
	})
}
const querylistApi= data =>{
	return http.post({
		url:'/books/query',
		data
	})
}
const pagelistApi= data =>{
	return http.post({
		url:'/books/page',
		data
	})
}
const delbookApi= data =>{
	return http.post({
		url:'/books/dbook',
		data
	})
}
const ebookApi=data=>{
	return http.post({
		url:'/books/ebook',
		data
	})
}
const myborrowApi=data=>{
	return http.post({
		url:'/books/myborrow',
		data
	})
}
const borrowApi=data=>{
	return http.post({
		url:'/books/borrow',
		data
	})
}
const returnApi=data=>{
	return http.post({
		url:'/books/return',
		data
	})
}
export default{
	loginApi,
	registerApi,
	codeApi,
	addbookApi,
	uploadApi,
	booklistApi,
	querylistApi,
	pagelistApi,
	delbookApi,
	ebookApi,
	myborrowApi,
	borrowApi,
	returnApi
}